package cate.common.table.call.row;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.table.item.hero.StarGroupList;
import com.fasterxml.jackson.annotation.JsonIgnore;
import easy.java.dev.note.NoteField;

public class CallSpecialCheatRow extends ERow {
    @NoteField(value = "召唤模式")
    public byte callMode;

    @NoteField(value = "召唤次数")
    public int times;

    @NoteField(value = "起始次数")
    public int startTime;

    @NoteField(value = "结束次数")
    public int endTime;

    @NoteField(value = "星族配置")
    public String group;

    @NoteField(value = "审核星组")
    public String examineGroup;

    @NoteField(value = "是否进入计算次数")
    public boolean calcRemainTimes;

    @Override
    public void parse(XSSFRowWrap xrw) {
        super.parse(xrw);
        this.id = xrw.getInteger("ID");
        this.callMode = xrw.getByte("召唤模式");
        this.startTime = xrw.getInteger("召唤启始");
        this.endTime = xrw.getInteger("召唤结束");
        this.group = xrw.getString("星组");
        this.examineGroup = xrw.getString("审核星组");
        this.calcRemainTimes = xrw.getBoolean("是否进入次数计算", false);
    }

    @JsonIgnore
    public StarGroupList config = new StarGroupList();

    @JsonIgnore
    public StarGroupList examineConfig = new StarGroupList();

    @Override
    public void decode() {
        config.parse(group);
        examineConfig.parse(examineGroup);
    }
}
